'use strict'
console.log(123123)
var zmq = require('zmq')
  /*
  let TcpClient = require('./connector/zmqconnector').TcpClient
  let TcpServer = require('./connector/zmqconnector').TcpServer
  let child_process = require('child_process')

  let count = 1
  let time1, time2
    //发送数据

  let s = new TcpServer('server')
  s.createServer(8000)

      s.createServer(8000, function(socket) {
        socket.on('data', function(data, a, b) {
          //console.log(data)
          if (count === 1) {
            time1 = new Date().getTime()
            console.log(time1)
          } else if (count === 40000) {
            time2 = new Date().getTime()
            console.log(count)
            console.log(time2)
            console.log(time2 - time1)
          }
          //console.log(count)
          count++
          socket.send('100')
        })

      })

      for (let i = 0; i < 4; i++) {
        let command = 'iojs'
        let args = ['--es_staging', './test1.js']
          //command = 'iojs --es_staging ' + this.mainpath + ' ' + sername + ' ' + this.configpath
        var child = child_process.spawn(command, args);
        child.stdout.on('data', function(data) {
          var msg = data.toString();
          process.stdout.write(msg);
        });

        child.stderr.on('data', function(chunk) {
          var msg = chunk.toString();
          process.stderr.write(msg);
        });
      }
      */
  /*
  let c = new TcpClient('server')
  c.connect(8000, '127.0.0.1')

    c.socket.send('200')
    c.socket.on('data', function(data, a, b) {
      console.log(data)
      console.log(a)
      console.log(b)
    })
    */
